define(function(require, exports, module) {
    window.$ = window.jQuery = require('jquery');
    require('bootstrap');
    require('common/bootstrap-modal-hack2');
    var Swiper=require('swiper');
    var Cookie = require('cookie');

    exports.load = function(name) {
        if (window.app.jsPaths[name.split('/', 1)[0]] == undefined) {
            name = window.app.basePath + '/assets/js/' + name;
        }
        seajs.use(name, function(module) {
            if ($.isFunction(module.run)) {
                module.run();
            }
        });

    };

    exports.loadScript = function(scripts) {
        for(var index in scripts) {
            exports.load(scripts[index]);
        }

    }

    window.app.load = exports.load;

    if (app.controller) {
        exports.load(app.controller);
    }

    if (app.scripts) {
        exports.loadScript(app.scripts);
    }

    if ($('html').hasClass('lt-ie8')) {
        var message = '<div class="alert alert-warning" style="margin-bottom:0;text-align:center;">';
        message += '由于您的浏览器版本太低，将无法正常使用本站点，请使用最新的';
        message += '<a href="http://windows.microsoft.com/zh-CN/internet-explorer/downloads/ie" target="_blank">IE浏览器</a>、';
        message += '<a href="http://www.baidu.com/s?wd=%E8%B0%B7%E6%AD%8C%E6%B5%8F%E8%A7%88%E5%99%A8" target="_blank">谷歌浏览器</a><strong>(推荐)</strong>、';
        message += '<a href="http://firefox.com.cn/download/" target="_blank">Firefox浏览器</a>，访问本站。';
        message += '</div>';
        $('body').prepend(message);
    }

});